<template>
  <div>
    <van-search
      placeholder="请输入小区或地址"
      show-action
      @click.native="$router.push('/city')"
    >
      <template #label>
        <span class="city">上海</span> <span class="line"></span>
      </template>
      <template #action>
        <van-icon name="location-o" size="20" color="#fff" />
      </template>
    </van-search>
    <van-sticky>
      <van-dropdown-menu>
        <van-dropdown-item title="区域">
          <van-picker
            show-toolbar
            :columns="columns"
            toolbar-position="bottom"
          />
        </van-dropdown-item>
        <van-dropdown-item title="方式" ref="fei">
          <van-picker
            show-toolbar
            toolbar-position="bottom"
            :columns="columns"
          />
        </van-dropdown-item>
        <van-dropdown-item title="租金" >
          <div class="list">
            <h3>地铁学校商场</h3>
            <span>四室</span>
            <p>1000元</p>
            <hr>
          </div>
        </van-dropdown-item>
        <van-dropdown-item title="筛选" @open="show = true" />
      </van-dropdown-menu>
    </van-sticky>
    <div style="height: 2000px"></div>
    <van-popup
      v-model="show"
      position="right"
      :style="{ height: '100%', width: '80%' }"
    >
      <div class="selected">
        <div class="title">户型</div>
        <div class="btn">
          <van-button plain type="primary" size="small">一室</van-button>
          <van-button plain type="info" size="small" >二室</van-button>
          <br />
          <van-button plain type="primary" size="small">三室</van-button>
          <van-button plain type="info" size="small">四室</van-button>
        </div>
        <hr />
      </div>
      <div class="selected">
        <div class="title">朝向</div>
        <div class="but">
        </div>
        <hr />
      </div>
      <div class="selected">
        <div class="title">楼层</div>
      </div>
    </van-popup>
  </div>
</template>

<script>
export default {
  name: 'find-page',
  data() {
    return {
      value: '',
      columns: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
      show: false
    }
  },
  methods: {}
}
</script>

<style scoped lang="less">
.van-search {
  width: 100%;
  background-color: #21b97a;
}
.city {
  position: relative;
}
.city::after {
  content: '';
  width: 0;
  height: 0;
  display: block;
  border: 6px solid transparent;
  border-top-color: #000;
  position: absolute;
  top: 6px;
  right: -16px;
}

::v-deep .van-grid-item__icon {
  color: #21b97a;
  background-color: rgba(195, 246, 223, 0.5);
  padding: 6px;
  border-radius: 50%;
}
.van-search__label {
  margin-right: 20px;
  .city::after {
    margin-left: 10px;
  }
}
.line {
  width: 1px;
  height: 14px;
  background: #ccc;
  display: inline-block;
  margin-left: 20px;
  position: relative;
  top: 4px;
}
.selected {
  padding: 0 15px;
  .title {
    margin: 20px 0;
    font-size: 15px;
    color: #333;
  }
}
.selected {
  padding: 0 15px;
  .btn {
    width: 200px;
    height: 100px;
    margin-left: 20px;
  }
}
.selected {
  padding: 0 15px;
  .but {
    width: 200px;
    height: 150px;
    margin-left: 20px;
  }
}
.list {
  height: 1000px;
}
</style>
